Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ show a notification item in the settings page #26843

Merged
merged 11 commits into from
Oct 24, 2024

Conversation

matteoscurati
Copy link
Contributor

@matteoscurati matteoscurati commented Sep 2, 2024

Description

This PR introduces the Notifications option within the settings page. Clicking on this option will render the user to the notifications/settings page.
Specifically:

  1. If basic functionalities are not active, the option disappears from the menu
  2. If notifications are not active, the user will still be redirected to the notifications/settings page, where they can enable them
  3. If notifications are active, the user will access the notifications/settings page, where they can select their options

Open in GitHub Codespaces

Related issues

N/A

Manual testing steps

  1. Go to the settings page.
  2. Find the Notifications option
  3. Verify that the Notifications option links to the notifications/settings page
  4. Verify that the Notifications option is hidden if basic functionalities are off

Screenshots/Recordings

Before

Screenshot 2024-10-23 at 16 26 12

After

Screenshot 2024-10-23 at 16 41 30

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@matteoscurati matteoscurati added the team-notifications Notifications team label Sep 2, 2024
Copy link
Contributor

github-actions bot commented Sep 2, 2024

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot
Copy link
Collaborator

Builds ready [a272aca]
Page Load Metrics (1821 ± 101 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint163926131821207100
domContentLoaded161926021805208100
load162726151821209101
domInteractive2495442110
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 115 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 70.15%. Comparing base (7dc6362) to head (2911149).

Files with missing lines Patch % Lines
.../notifications-settings/notifications-settings.tsx 0.00% 1 Missing ⚠️
ui/pages/settings/settings.component.js 66.67% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26843      +/-   ##
===========================================
- Coverage    70.15%   70.15%   -0.00%     
===========================================
  Files         1425     1425              
  Lines        49653    49656       +3     
  Branches     13891    13892       +1     
===========================================
+ Hits         34833    34835       +2     
- Misses       14820    14821       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matteoscurati matteoscurati marked this pull request as ready for review September 10, 2024 14:34
@matteoscurati matteoscurati requested review from a team as code owners September 10, 2024 14:34
@matteoscurati matteoscurati force-pushed the feat/settings-page-add-notifications branch 2 times, most recently from 8e62d16 to 5d376ee Compare September 10, 2024 15:00
@metamaskbot
Copy link
Collaborator

Builds ready [1ca448e]
Page Load Metrics (1866 ± 208 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint34131411794560269
domContentLoaded148630671857432208
load149130711866432208
domInteractive18135443316
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 124 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

sonarcloud bot commented Sep 11, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [2911149]
Page Load Metrics (1650 ± 74 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint60619261583263126
domContentLoaded13801918163115474
load13881926165015474
domInteractive13146403115
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 124 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [66187ca]
Page Load Metrics (1886 ± 108 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint163125511883218104
domContentLoaded16212451184120498
load163225631886226108
domInteractive1789472010
backgroundConnect11112433115
firstReactRender452901126732
getState570192110
initialActions01000
loadScripts11551812135016378
setupStore1197272311
uiStartup181229192129283136
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 124 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [e9d0a98]
Page Load Metrics (1941 ± 70 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27222551786507243
domContentLoaded17132235190413665
load17262269194114670
domInteractive279351189
backgroundConnect147040189
firstReactRender53220963517
getState793272814
initialActions01000
loadScripts12371679140211957
setupStore1088362613
uiStartup19192596217918388
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 126 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

mathieuartu
mathieuartu previously approved these changes Oct 23, 2024
Copy link
Contributor

@mathieuartu mathieuartu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -82,7 +81,7 @@ export default function NotificationsSettings() {
ariaLabel="Back"
iconName={IconName.ArrowLeft}
size={ButtonIconSize.Sm}
onClick={() => history.push(NOTIFICATIONS_ROUTE)}
onClick={() => history.goBack()}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edge case, might be fine.

What happens when a user:

  1. Goes to google,
  2. Visits this page via URL
  3. Clicks this button.

Should they be navigated back to google or to the extension?

I don't want this to be a blocker - so lets ticket and tackle this edge-case later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Prithpal-Sooriya good catch! Look at the new implementation :)

Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update the PR description to include before/after image or a recording (just to help testing purposes)

@metamaskbot
Copy link
Collaborator

Builds ready [5ea420d]
Page Load Metrics (1740 ± 52 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16032012174710852
domContentLoaded1592194517039345
load16062018174010852
domInteractive15155383115
backgroundConnect10104442613
firstReactRender46200953919
getState57815189
initialActions00000
loadScripts1137145212547838
setupStore1166272110
uiStartup17872279195315976

@matteoscurati matteoscurati added this pull request to the merge queue Oct 24, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2024
@matteoscurati matteoscurati added this pull request to the merge queue Oct 24, 2024
Merged via the queue into develop with commit fa97321 Oct 24, 2024
76 checks passed
@matteoscurati matteoscurati deleted the feat/settings-page-add-notifications branch October 24, 2024 08:45
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2024
@metamaskbot metamaskbot added the release-12.7.0 Issue or pull request that will be included in release 12.7.0 label Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.7.0 Issue or pull request that will be included in release 12.7.0 team-notifications Notifications team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants